package router

import (
	"gin-vue-admin/api/v1"
	"gin-vue-admin/api/view_api"
	"gin-vue-admin/middleware"
	"github.com/gin-gonic/gin"
)

func InitUserProjectRouter(Router *gin.RouterGroup) {
	UserProjectRouter := Router.Group("userProject").Use(middleware.OperationRecord())
	{
		UserProjectRouter.POST("createUserProject", v1.CreateUserProject)   // 新建UserProject
		UserProjectRouter.DELETE("deleteUserProject", v1.DeleteUserProject) // 删除UserProject
		UserProjectRouter.DELETE("deleteUserProjectByIds", v1.DeleteUserProjectByIds) // 批量删除UserProject
		UserProjectRouter.PUT("updateUserProject", v1.UpdateUserProject)    // 更新UserProject
		UserProjectRouter.GET("findUserProject", v1.FindUserProject)        // 根据ID获取UserProject
		UserProjectRouter.GET("getUserProjectList", v1.GetUserProjectList)  // 获取UserProject列表
	}
}


func InitUserProjectPublic(Router *gin.RouterGroup){
	UserProjectRouter := Router.Group("view_api/userProject")
	{
		UserProjectRouter.POST(`createUserProject`,view_api.UserCreateProject)
		UserProjectRouter.POST(`updateUserProject`,view_api.UserUpdateProject)
		UserProjectRouter.GET(`getProjectById`,view_api.GetUserProject)
	}
}